package com.service.vecc;

import com.common.ErrorCodeEnum;
import com.common.emums.DataStatus;
import com.common.exception.BusinessException;
import com.common.utils.StringUtils;
import com.core.springSecurity.common.SecurityUtils;

import com.dao.primary.vecc.VeccDataForwardEquipmentInfoMapper;
import com.model.domain.vecc.GetVeccDataForwardEquipmentInfoDO;
import com.model.pojo.vecc.VeccDataForwardEquipmentInfo;
import com.model.pojo.vecc.VeccDeviceModelAuthRecordInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;



/**
 * @Author: zql
 * @Description: 环保国四监控数据转发设备记录信息服务
 * @Data: 2024-03-29
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class VeccDataForwardEquipmentInfoService {
    private final VeccDataForwardEquipmentInfoMapper veccDataForwardEquipmentInfoMapper;
    public List<VeccDataForwardEquipmentInfo> getPageList(GetVeccDataForwardEquipmentInfoDO getVeccDataForwardEquipmentInfoDO){
        PageHelper.clearPage();
        PageHelper.startPage(getVeccDataForwardEquipmentInfoDO.getPage(),getVeccDataForwardEquipmentInfoDO.getPageSize(),getVeccDataForwardEquipmentInfoDO.getSortRow()+getVeccDataForwardEquipmentInfoDO.getSortOrder());
        return veccDataForwardEquipmentInfoMapper.selectList(getVeccDataForwardEquipmentInfoDO);
    }

    public int save(VeccDataForwardEquipmentInfo info){
        return veccDataForwardEquipmentInfoMapper.insertSelective(info);
    }
    public int update(VeccDataForwardEquipmentInfo info){
        return veccDataForwardEquipmentInfoMapper.updateByPrimaryKeySelective(info);
    }
    public void saveList(List<VeccDataForwardEquipmentInfo> list){
        veccDataForwardEquipmentInfoMapper.insertListSelective(list);
    }
}
